package Threading;

public class ThreadDemo2 {
    public static void main(String[] args) {
        Thread t = new Thread(()->{
            /*while (!Thread.currentThread().isInterrupted()){
                System.out.println("hello t");
                *//*try{
                    Thread.sleep(1000);
                }catch (InterruptedException e){
                    try {
                        Thread.sleep(2000);
                    } catch (InterruptedException ex) {
                        ex.printStackTrace();
                    }
                    break;
                }*//*
            }*/
            System.out.println("线程运行中");
        });
        t.start();
        System.out.println(Thread.currentThread().isInterrupted());

        /*try {
//            Thread.sleep(3000);
            Thread.sleep(1000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }*/
        t.interrupt();
        System.out.println(Thread.currentThread().isInterrupted());
    }
    /*你觉得这个程序应该有怎样的执行结果呢？*/
}
